<!-- 电影详情导航-->
<template>
  <el-menu
      @select="toSelect"
      :default-active="$store.getters.getMovieDetailNavActiveIndex"
      class="el-menu-demo"
      mode="horizontal">
    <el-menu-item index="1">
      介绍
    </el-menu-item>
    <el-menu-item index="2">
      演职人员
    </el-menu-item>
    <el-menu-item index="3">
      奖项
    </el-menu-item>
    <el-menu-item index="4">
      图集
    </el-menu-item>
  </el-menu>
</template>

<script>
export default {
  name: "CastNav",
  data() {
    return {
      activeIndex: '1'
    }
  },
  props: {
    introduceInfo: {
      type: Object,
      default() {
        return {}
      }
    },
  },
  methods: {
    toSelect(index) {
      switch (index) {
        case '1':
          this.$router.push({name: 'introduce'})
          break
        case '2':
          this.$router.push({name: 'actors'})
          break
        case '3':
          this.$router.push({name: 'awards'})
          break
        case '4':
          this.$router.push({name: 'pictures'})
          break
      }
    }
  },
}
</script>

<style scoped>

</style>